package com.itheima.service;

import com.itheima.bean.ShoppingCart;
import com.itheima.dto.SubDto;

import java.util.List;

public interface ShoppingCartService {

    /**
     *
     * @param shoppingCart
     * @return
     */
   ShoppingCart add(ShoppingCart shoppingCart);

    /**
     * 根据用户id来查询该用户的购物车数据
     * @param uid
     * @return
     */
   List<ShoppingCart>  findByUid(long uid);

    /**
     * 清除指定用户的购物车数据
     * @param uid
     * @return
     */
   int  clean(long uid);

    List<ShoppingCart> sub(SubDto subDto);
}
